<?php

namespace app\common\validate;

use think\Validate;

class PrivateCloud extends Validate
{
    /**
     * 验证规则
     */
    protected $rule = [
        'code' => 'require|unique:PrivateCloud,code',
    ];
    /**
     * 提示消息
     */
    protected $message = [
    ];
    /**
     * 验证场景
     */
    protected $scene = [
        'add' => ['code'],
        'edit' => ['code' => 'require|unique:PrivateCloud,code^id'],
    ];

    public function __construct(array $rules = [], $message = [], $field = [])
    {
        parent::__construct($rules, $message, $field);
    }

}
